home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Aminet 1 (Walnut Creek)
/
Aminet - June 1993 [Walnut Creek].iso
/
aminet
/
text
/
misc
/
ht.lha
/
hypertext
/
.edrc
next >
Wrap
Text File
|
1990-12-23
|
8KB
|
231 lines
# This file contains essentially two parts. This first part (right below)
# is my "generic" setup for use with DME. These bindings just happen to
# be what I've gotten used to using after about a year and a half with DME.
# The second part of the file contains the macros that work with HT. You
# can cut that second part out if you like and append it to your own .edrc
# file, or you can just use this setup.
# left and right cursor-keys with line-wraparound
map `left' `ifelse l `if !t `up last'' left'
map `right' `ifelse r `if !b `down first'' right'
resettoggle 179
map `sL-lmb' `if 179 unblock tomouse block ifelse cb `bsave ram:dme.L.clip settoggle 179' `resettoggle 179''
map `cL-lmb' `goto start'
map `aL-lmb' `goto end'
map `saL-lmb' `tomouse insfile ram:dme.L.clip'
map `csaL-lmb' `bsave ram:dme.L.clip bdelete'
# same as definitions above, except utilize right mouse-button and operate upon the right clipboard
map `sR-rmb' `if 179 unblock tomouse block ifelse cb `bsave ram:dme.R.clip settoggle 179' `resettoggle 179''
map `cR-rmb' `goto start'
map `aR-rmb' `goto end'
map `saR-rmb' `tomouse insfile Ram:dme.R.clip'
map `csaR-rmb' `bsave Ram:dme.R.clip bdelete'
# miscellaneous
map `c-k' `remeol'
map `tab' `tab'
map `s-tab' `backtab'
insertmode on
savetabs on
resettoggle 1
resettoggle 2
map (A-r) (if 2 (toggle 2) settoggle 1 escimm (findr ))
map (A-s) (if 1 (toggle 1) settoggle 2 escimm (find ))
map (A-g) (ifelse 1 (nextr) (if 2 next))
map (A-o) (escimm (newfile ) chfilename \$filename)
map (A-w) (if m saveold)
map (A-q) (quit)
map (A-k) (unblock block block bsave RAM:dme.line.temp bdelete first)
map (A-l) (insfile RAM:dme.line.temp)
map (A-b) (block)
map (A-x) (bsave RAM:dme.temp bdelete)
map (A-c) (bcopy unblock)
map (A-i) (insfile RAM:dme.temp)
map (A-p) `escimm `Press [RETURN] to Print, [ESC] to stop' saveas `PRT:''
map (A-t) (ifelse 0 (toggle 0 top) (toggle 0 bottom))
map (cA-e) (unblock block block bsource unblock)
map (R-rmb) (MENUON)
map (bs) (ifelse !l (bs) (up last join))
map (del) (ifelse !r (del) (join))
map (tab) (( ))
map (a-del) (ifelse !r (del) (join))
map (return) (split down first)
map (f1) (saveold iconify)
#some emacs style movement commands...
map (c-n) (DOWN)
map (c-p) (up)
map (c-e) (last)
map (c-a) (first)
map (c-f) (right)
map (c-b) (left)
#kludge here to get DME to differentiat between the key del and the command del
map (c-d) (a-del)
map (c-l) (arpload)
map (c-;) (esc)
map (c-left) first
map (c-right) last
map (c-up) (top)
map (c-down) (bottom)
map (s-left) (wleft)
map (s-right) (wright)
map (s-up) (pageup)
map (s-down) (pagedown)
menuoff
menuadd Project Clear (newfile unnamed)
menuadd Project Save (if m saveold)
menuadd Project (Save As) (arpsave)
menuadd Project Open (arpload chfilename \$filename)
menuadd Project (Insert File) (escimm (insfile ))
menuadd Project (Dos Command...) (escimm (execute ))
menuadd Project (More DME!) (newwindow arpload)
menuadd Project NewCLI (execute c:newcli)
menuadd Project Quit (quit)
menuadd Edit (Block on/off) (block)
menuadd Edit (Cut Block) (bsave RAM:dme.temp bdelete)
menuadd Edit Copy (bcopy)
menuadd Edit Paste (insfile RAM:dme.temp)
menuadd Edit UnHighlite (unblock)
menuadd Tools Search (escimm (find ))
menuadd Tools Replace (escimm (findr ))
menuadd Tools (Repeat Search) (next)
menuadd Tools (Repeat Replace) (nextr)
menuadd Tools (Global Replace) (escimm (findstr ) escimm (repstr ) repeat lbot (nextr))
menuadd Tools (Ignore Case on S&R) (ignorecase toggle)
menuadd Tools (Mark Spot) (ping 1)
menuadd Tools (Jump to Spot) (pong 1)
menuadd Tools Insert (insertmode on)
menuadd Tools Overwrite (insertmode off)
menuadd Tools LF->CRLF (top repeat -1 (last tlate 13 down))
menuadd Tools CRLF->LF (top repeat -1 (last left if c=13 del down))
menuon
# My own settings for DME
# © Mikael Karlsson
# Distribute as you wish but don't claim them for your own creation.
addpath s:
map `c-ret' `last'
#Extra stuff
map `s-help' (newwindow)
map `a-t' (block block down down bmove up)
map `s-bs' (left while c=32 (del left) ifelse ca (while ca (right bs left)) (while !ca (right bs left)) right)
map `tab' (ifelse t (tab) (up s-right down))
map `bs' (ifelse l (up last join if !l (del)) (bs))
# This does auto indenting.
map `return' (split first while c=32 (down ` ' up) if c=123 (down ` ' up) while c=32 (down ` ' up) down)
#C-Style
map `(' (`()' left)
map `)' `ifelse c=41 `right' ``)'''
map `{' (`{ }' left)
map `}' (ifelse c=125 (c-bs c-bs right) (`}'))
map `[' (`[]' left)
map `]' (ifelse c=93 (right) (`]'))
map `"' (ifelse c=34 (right) (`""' left))
map `;' (ifelse c=125 (`;' -return) (`;'))
#######################################################################
##
## HT SECTION
##
#######################################################################
# The following macros are designed to be used from within DME when
# creating documents for HT. Their purpose is to make life a little
# easier and faster. Just source this file when you want to work on
# HT documents (and also make sure that REXX will be able to find the
# dme macros).
#
# I used "alt" based keymappings because I figured they wouldn't
# conflict with keymaps you already have.
# Feel free to change the keymappings as you see fit. I thought they
# made sense, maybe you don't.
#
# D.B.G. July 1990
# The "test macro". It will save the current filename, then call an
# Arexx macro to load this file directly into HT
#
map a-t (saveold rx1 test \$filename)
# for ease of typing, we'll add this too.
map c-t (a-t)
# These (tiny) macros are setup to insert the necessary text to turn
# on (and off) the specified attributes.
# Oh, BTW - all the backslashes *are* necessary as far as I know ;-(
map a-b ( `\\\\Bold ' )
map a-i ( `\\\\Italic ' )
map a-u ( `\\\\Underline ' )
map a-c ( `\\\\Center ' )
map a-d ( `\\\\Indent ' )
map a-f ( `\\\\Format ' )
map a-r ( `\\\\FreeFormat ' )
# And the two biggie macros.... these handle creating a link in your
# document. Since DME doesn't do char based highlighting/blocking we
# have to do a Start link (a-s) to know exactly where to start the link
# and then the actual LINK macro which will call an Arexx macro to
# pop up a window which you use to specify your link. The Arexx macro
# then inserts the appropriate text into your document at the right spots.
#
# The first macro is used to define where to START the link,
# I have used text markers 8 and 9 pretty arbitrarily. Change them
# here and in link.dme if they conflict with what you use them for
map a-s (ping 8)
# and the second macro actually makes the call...
map a-l (ping 9 rx do_link)
# the do_link.dme macro depends on the following definition for proper
# cursor movement on the screen. It is obscure enough that I doubt anyone
# has it defined. (would you really press ctrl-alt-shift nk6?)
map cas-nk6 (ifelse r (if !b (down first)) right)
# Here we add some menus to the window so that we can have some
# user-friendliness... (ackk, cough, gasp ! user-friendly, what a horrible
# word ;-)
#
# If you don't want this stuff, just comment it out - it doesn't do or
# add anything extra.
menuoff
menuadd HyperText `Bold on/off' (a-b)
menuadd HyperText `Italics on/off' (a-i)
menuadd HyperText `Underline on/off' (a-u)
menuadd HyperText `Center on' (a-c)
menuadd HyperText `Indent Paragraph' (a-i)
menuadd HyperText `Formatting ON' (a-f)
menuadd HyperText `Formatting OFF' (a-r)
menuadd HyperText () (null)
menuadd HyperText `Define Setup Info'(setup)
menuadd HyperText () (null)
menuadd HyperText `Start Link' (a-s)
menuadd HyperText `Define Link' (a-l)
menuadd HyperText () (null)
menuadd HyperText `Test current Document' (a-t)
menuon